package unit4.part12.vip;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String text = scanner.next();
        String[] strs = text.split(",");
        int[] nums = new int[strs.length];
        for (int i = 0; i < strs.length; i++) {
            nums[i] = Integer.parseInt(strs[i]);
        }
        Player player = new Player(0, nums);
        VIP vip = new VIP(0, nums);
        SuperVIP superVIP = new SuperVIP(100, nums);

        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {
            player.gainExp();
            vip.gainExp();
            superVIP.gainExp();
        }

        System.out.println(player.exp);
        System.out.println(vip.exp);
        System.out.println(superVIP.exp);
    }
}
